package stringmatch;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Comparator;

public class KmpTest {
    public static void main(String[] args) {
        String T = "bacbababaabcbabababacab";
        String P = "ababaca";
//        Kmp.kmpMatch(T.toCharArray(), P.toCharArray());

//        String T = "abcda";
//        String P = "cd";
        System.out.println("KMP");
        int a = Kmp.getIndexOf(T, P);
        System.out.println(a);

        int[] arr = new int[] {2,3,1,6,4,9,5};
        StringBuilder sb = new StringBuilder("1bc");
        sb.toString();

        System.out.println();
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }
}
